package com.cskaoyan.market.controller.admin;

import com.cskaoyan.market.annotation.RequiresPermissionsDesc;
import com.cskaoyan.market.bo.CommonListBo;
import com.cskaoyan.market.db.domain.MarketCollect;
import com.cskaoyan.market.service.AdminCollectService;
import com.cskaoyan.market.util.ResponseUtil;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@RestController
@RequestMapping("/admin/collect")
public class AdminCollectController {

    @Autowired
    AdminCollectService adminCollectService;

    @GetMapping("list")
    @RequiresPermissions("admin:collect:list")
    @RequiresPermissionsDesc(menu = {"用户管理", "会员收藏"},button = "查询")
    public Object list(CommonListBo commonListBo)  {
        List<MarketCollect> addressList = adminCollectService.list(commonListBo);
        return ResponseUtil.okList(addressList);
    }

}
